package com.dogstalks.network;

import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;

import android.util.Log;

public class XMLPullParserManager {
	//private static String DEBUG = "dogstlks_parsing";
	private static String DEBUG = "dogstlks";
	
	private static XmlPullParser pullParser;
	
	public static XmlPullParser generateXmlPullParser(){
		if(pullParser != null){
			return pullParser;
		}else{
			try{
				XmlPullParserFactory parserFactory = XmlPullParserFactory.newInstance();
				pullParser = parserFactory.newPullParser();
			}catch(XmlPullParserException xppe){
				Log.e(DEBUG, "generateXmlPullParser()", xppe);
			}
			return pullParser;
		}
	}
	
	
}
